load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "rich-cas-client",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "lib": {"name": "rich-cas-client"},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-rich-cas-client",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:itertools",
        "fbsource//third-party/rust:once_cell",
        "fbsource//third-party/rust:tracing",
        "//eden/scm/lib/blob:blob",
        "//eden/scm/lib/cas-client:cas-client",
        "//eden/scm/lib/cas-client/re-cas-common:re-cas-common",
        "//eden/scm/lib/clientinfo:clientinfo",
        "//eden/scm/lib/config/model:configmodel",
        "//eden/scm/lib/types:types",
        "//eden/scm/lib/util/factory:factory",
        "//remote_execution/cas/client_lib/ligen:rich_cas_client_wrapper-rs_bindings",
        "//remote_execution/cas/client_lib/wrappers/rust:cas_client_lib",
    ],
)
